<!DOCTYPE html>
<html>
<head>
	<title>画布模板</title>
	<style type="text/css">
		*{padding:0px;margin:0px;}
		.canvasbox{width: 500px;height: 500px;margin:100px auto;}
	</style>
</head>
<body>
	<div class="canvasbox">
		<canvas id="mycanvas" width="500px" height="500px"></canvas>
	</div>
	<script type="text/javascript" src="modernizr-custom.js"></script>
	<script type="text/javascript">
		window.addEventListener("load",eventWindowLoaded,false);
		function eventWindowLoaded(){
			canvasApp()
		}
		function canvasSupport(){
			return Modernizr.canvas;
		}
		function canvasApp(){
				if(!canvasSupport()){
					return false;
				}else{
					var canvas = document.getElementById("mycanvas");
		 			var context = canvas.getContext("2d");
				}
				
		 				
		 		function drawScreen(){

		 				
				}

						

				// 动画函数		
				function gameLoop(){
					window.setTimeout(gameLoop,500);
					drawScreen()

				}
				gameLoop()
			
		}

		 
		

		
	</script>
</body>
</html>